package com.imooc;

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.data.redis.core.RedisTemplate;

import javax.annotation.Resource;

@SpringBootTest
public class Imooc {

    @Resource
    private RedisTemplate redisTemplate;

    @Test
    void set() {
        redisTemplate.opsForValue().set("b", "我是刚子");
        System.out.println(redisTemplate.opsForValue().get("b"));
    }

}
